Skip to content

AGENTS.md: add a pushing section - #2

Open
lingrui96 wants to merge 1 commit into
mainfrom
agents-pushing-policy
Open

AGENTS.md: add a pushing section#2
lingrui96 wants to merge 1 commit into
mainfrom
agents-pushing-policy

Conversation

@lingrui96

Copy link
Copy Markdown
Member

Follow-up to your point on #1, that this belongs in its own change as accepted policy rather than as a proposal awaiting veto. The text is written as instruction, so merging it is the acceptance. Docs only, no code or results touched.

What it says

  • Work reaches main through a pull request rather than a direct push. An agent may push a branch and open the pull request when asked; the merge stays a human decision.
  • Force push only while a branch is unreviewed, since a force push after a review detaches the comments from the code they describe.
  • A pull request that adds or replaces result/<profile>/ names the machine that produced the sweep in its description.
  • Hostnames stay out of pull request descriptions as well as out of result files.

Two clauses that came from #1 rather than from principle

The force push clause is conditional, not absolute. The branch on #1 was rebuilt with a force push before review to scrub a hostname from its history. That seemed right at the time and still does, so a blanket ban would have outlawed it; the distinction that actually matters is whether anyone has reviewed yet.

The hostname clause covers descriptions because the first description of #1 quoted several hostnames and had to be edited afterwards. The existing rule only covered files.

Note

This describes the flow #1 followed, not what the history shows: your own commits have gone straight to main, which is normal for a maintainer on their own repository. If you would rather the rule apply only to contributors and agents, or want it softened to a preference, say so and I will reword it. Equally happy to drop any clause you disagree with.

🤖 Generated with Claude Code

The repository has no written rule for how work reaches main, which came
up when an agent had to decide between pushing to main directly, the
habit visible in the history, and opening a pull request. This states the
pull request flow as an instruction rather than a proposal, per the
review on #1.

Two clauses come from what went wrong on #1 rather than from principle.
Force push is allowed only before review, since the branch there was
rebuilt to scrub a hostname, which is legitimate while nobody has
reviewed and destructive once someone has. And hostnames are kept out of
pull request descriptions, not just result files, since the first
description of #1 quoted several and had to be edited.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant